<template>
  <div class="print-render-form-content">
    <div>这是配置的内容</div>
    <a-button style="margin-left: 10px" type="primary" @click="handleChange">变更打印配置</a-button>
  </div>
</template>

<script lang="ts" setup>
  import { Button as AButton } from 'ant-design-vue';

  const props = defineProps(['jnpfUniverApi']);
  const emits = defineEmits(['change']);

  function handleChange() {
    if (!props.jnpfUniverApi) {
      return;
    }

    emits('change', {
      paperSize: 'A3',
      direction: 'Landscape',
      area: 'CurrentSheet',
      scale: 'Origin',
      hAlign: 'Middle',
      vAlign: 'Start',
      gridlines: true,
      PageSize: true,
      WorkbookTitle: true,
      WorkbookTitleText: 'JNPF报表',
      WorksheetTitle: true,
      Date: true,
      Time: true,
    });
  }
</script>

<style lang="less">
  .print-render-form-content {
    width: 250px;
    height: calc(100%);
    margin-left: 16px;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
  }
</style>
